<template>
	<view>
		<scroll-view class="scroll" scroll-x="true">
			
			
			<view class="scroll-item" v-for="(item,index) in list " :key="index">
				<view class="box">
					<u-image width="150upx" height="150upx" :src="item.src"></u-image>
					<text style="color: #16BDE2;">￥{{item.price}}</text>
					<text style=" text-decoration:line-through">￥{{item.price1}}</text>
				</view>
			</view>
		
			
		</scroll-view>
		
	</view>
</template>

<script>
	export default {
		name: "scroll-x",
		data() {
			return {

			};
		},
		props:['list'],
		created(){
			console.log(this.list)
		},
	}
</script>

<style lang="scss" scoped>
	.scroll {
		display: inline-block;
		white-space: nowrap;
		width: 100%;
	}

	.scroll-item {
		display: inline-block;
		background-color: #FFFFFF;
		border-radius: 2px;
		height: auto !important;
		width: 170upx;
		
	}

	// 以上是组件壳子样式
	.box {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
</style>
